from elasticsearch import AsyncElasticsearch

from app.settings.config import ELASTICSEARCH_HOSTS


def es_init() -> AsyncElasticsearch:
    """
    初始化Elasticsearch
    :return:
    """
    return AsyncElasticsearch(ELASTICSEARCH_HOSTS)


es = es_init()
